
//抽象套餐类

public abstract class  AbstractPackage {

    private int monthlyCost;                   // 成员变量：每月资费
    private int phonePackage;                  // 成员变量：套餐数量

    //自定义无参构造
    public AbstractPackage() {
    }
    //自定义有参构造
    public AbstractPackage(int monthlyCost, int phonePackage) {
        setMonthlyCost(monthlyCost);
        setPhonePackage(phonePackage);
    }

    //提供共有的get和set方法
    public int getMonthlyCost() {
        return monthlyCost;
    }
    public void setMonthlyCost(int monthlyCost) {
        this.monthlyCost = monthlyCost;
    }

    public int getPhonePackage() {
        return phonePackage;
    }

    public void setPhonePackage(int phonePackage) {
        this.phonePackage = phonePackage;
    }
    public abstract void showInfo();
}
